package com.example.zhanglinan.vrdemo.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.zhanglinan.vrdemo.R;
import com.example.zhanglinan.vrdemo.TreasureHunt.TreasureHuntActivity;

/**
 * Created by pc on 2017/2/19.
 */

public class HuntFragment extends Fragment {
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_hunt, container, false);
        Button button = (Button) view.findViewById(R.id.bt_hunt);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), TreasureHuntActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }
}
